from urllib.parse import urlencode
from django import template

register = template.Library()


@register.filter
def starts_with(value, arg):
    """Usage, {% if value|starts_with:"arg" %}"""
    return value.startswith(arg)    